package com.itany.netclass.service;

import com.itany.netclass.entity.Resource;
import com.itany.netclass.exception.NullSringException;
import com.itany.netclass.exception.PDFException;
import com.itany.netclass.exception.ServiceException;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.List;

/**
 * Author:jiyinchao@itany.com
 * Date:2021/10/17 14:14
 * Version:1.0-SNAPSHOT
 */
public interface ResourceService {
    public Resource findMp4ByChapterId(String chapterId) throws PDFException, NullSringException, ServiceException;

    public void uploadPDF(String chapterId, HttpSession session, ServletOutputStream outputStream) throws PDFException, NullSringException, IOException, ServiceException;

    public List<Resource>  findResourceById(String resourceId) throws ServiceException;

    public List<Resource> findResourceByForm(String title, String nickname, String kaishitime, String jieshutime, String status, String fileType) throws NullSringException, ServiceException;

    public List<Resource> findAllResource() throws NullSringException, ServiceException;

    public void yongResource(String resourceId, String status) throws Exception;
}
